﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TextFilesAppSupport
{
    public enum ErrorType
    {
        OK,
        CannotReadFromFile,
        NotImplementedMethod,
    };

    public class ErrorCode
    {
        private ErrorType type;
        private string message;

        private ErrorType Type
        {
            get
            {
                return this.type;
            }
            set
            {
                this.type = value;
            }
        }

        private string Message
        {
            get
            {
                return this.message;
            }
            set
            {
                this.message = value;
            }
        }

        public ErrorCode(ErrorType _type, string _message = "")
        {
            this.type = _type;
            this.message = _message;
        }        

        public static ErrorCode CreateErrorCode(ErrorType _type, string _message = "")
        {
            return new ErrorCode(_type, _message);
        }
    }

    
}
